-
Notifications
You must be signed in to change notification settings - Fork 747
Add torchao checkpoint tests #14074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add torchao checkpoint tests #14074
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14074
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Cancelled Job, 37 PendingAs of commit 2f47f54 with merge base a90e907 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| case "$MODEL_NAME" in | ||
| qwen3_4b) | ||
| echo "Running Qwen3-4B export..." | ||
| HF_MODEL_DIR=$(hf download metascroy/Qwen3-4B-INT8-INT4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: before landing, update the PyTorch checkpoint and change this to pytorch/Qwen3-4B-INT8-INT4
|
|
||
| phi_4_mini) | ||
| echo "Running Phi-4-mini export..." | ||
| HF_MODEL_DIR=$(hf download metascroy/Phi-4-mini-instruct-INT8-INT4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: before landing, update the PyTorch checkpoint and change this to pytorch/Phi-4-mini-instruct-INT8-INT4
| cmake -DPYTHON_EXECUTABLE=python \ | ||
| -DCMAKE_INSTALL_PREFIX=cmake-out \ | ||
| -DEXECUTORCH_ENABLE_LOGGING=1 \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \ | ||
| -DEXECUTORCH_BUILD_XNNPACK=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_LLM_RUNNER=ON \ | ||
| -DEXECUTORCH_BUILD_EXTENSION_LLM=ON \ | ||
| -DEXECUTORCH_BUILD_KERNELS_LLM=ON \ | ||
| -Bcmake-out . | ||
| cmake --build cmake-out -j16 --config Release --target install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we just test via the preset now?
cmake --preset llm -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake-out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work. I'm reverting back to not using the preset.
I filed an issue here: #14132
| @@ -0,0 +1,139 @@ | |||
| #!/usr/bin/env bash | |||
| set -euo pipefail | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use -x as well for scripts that will run in CI; makes debugging easier
This PR adds new tests that the pre-quantized model checkpoints we publish on pytorch work with ExecuTorch (lowering and C++ runner).
qwen3-4b is tested for both lowering and runtime.
phi4-mini is tested for lowering. There appears to be a regression in the C++ HF tokenizer used in the ExecuTorch, and it no longer works with the phi4-mini tokenizer. See #14077